//
//  ColorMarcro.h
//  CommonLibrary
//
//  Created by Alexi on 13-10-23.
//  Copyright (c) 2013年 ywchen. All rights reserved.
//

#ifndef CommonLibrary_ColorMarcro_h
#define CommonLibrary_ColorMarcro_h

#import "UIColor+MLPFlatColors.h"

#ifndef kAppModalBackgroundColor
// 模态框内容背景色
#define kAppModalBackgroundColor    [kBlackColor colorWithAlphaComponent:0.6]
#endif

#ifndef kAppModalDimbackgroundColor
// 模态框dim的背景色
#define kAppModalDimbackgroundColor [RGB(16, 16, 16) colorWithAlphaComponent:0.3]
#endif

#ifndef kDefaultCellHeight
// 默认TableViewCell高度
#define kDefaultCellHeight 50
#endif

#ifndef kMainTextColor
// 默认的字体颜色
#define kMainTextColor                kBlackColor
#endif

#ifndef kDetailTextColor
#define kDetailTextColor              RGB(145, 145, 145)
#endif

#ifndef kDownRefreshLoadOver
#define kDownRefreshLoadOver    @"没有更多了"
#endif

#ifndef kDownReleaseToRefresh
#define kDownReleaseToRefresh   @"松开即可更新..."
#endif

#ifndef kDownDragUpToRefresh
#define kDownDragUpToRefresh    @"上拉即可更新..."
#endif

#ifndef kDownRefreshLoading
#define kDownRefreshLoading     @"加载中..."
#endif

#define kNetErrorMsg            @"网络异常请重试"

#ifndef kCommonLargeTextFont
// CommonLibrary中常用的字体
#define kCommonLargeTextFont       [UIFont systemFontOfSize:16]
#endif

#ifndef kCommonMiddleTextFont
#define kCommonMiddleTextFont      [UIFont systemFontOfSize:14]
#endif

#ifndef kCommonSmallTextFont
#define kCommonSmallTextFont       [UIFont systemFontOfSize:12]
#endif

// app主色调(237, 79, 80)
#define kAppMainColor               RGB(255, 34, 68)       // app主色调
#define kAppMainHeaderColor         [UIColor whiteColor]
#define kNavBarThemeColor           [UIColor whiteColor]    // 导航主色调
// app主颜色 黑色 大部分黑色都用这个
#define KAppMainTextBackColor       [UIColor colorWithRed:0.239 green:0.255 blue:0.271 alpha:1.00]

// 默认背景色
#define kBackGroundColor            RGB(238, 238, 238)
#define kGaryGroundColor            [UIColor colorWithRed:0.941 green:0.941 blue:0.941 alpha:1.00]
#define kWhiteGatyGroundColor       [UIColor colorWithRed:0.953 green:0.965 blue:0.961 alpha:1.00]

//// 灰色字体(颜色：由深到浅)
#define kAppGrayColor1              RGB(85, 85, 85)
#define kAppGrayColor2              RGB(153, 153, 153)
#define kAppGrayColor3              RGB(168, 168, 168)
#define kAppGrayColor4              RGB(203, 203, 203)

//线条颜色
#define kLineColor                  RGB(227,229,233)
#define kLineLightColor             RGB(202,202,202)
#define K_O2OLineColor              [UIColor colorWithRed:0.945 green:0.949 blue:0.957 alpha:1.00];

// 间隔、线条颜色
#define kAppSpaceColor              RGB(229, 229, 229)
#define kAppSpaceColor2             RGB(235, 238, 238)


// 边框颜色
#define kAppBorderColor             [(kAppSpaceColor) CGColor]

// 黑色透明色（透明度：由高到低）
#define kGrayTransparentColor1      [[UIColor blackColor] colorWithAlphaComponent:0.1]
#define kGrayTransparentColor2      [[UIColor blackColor] colorWithAlphaComponent:0.2]
#define kGrayTransparentColor3      [[UIColor blackColor] colorWithAlphaComponent:0.4]
#define kGrayTransparentColor4      [[UIColor blackColor] colorWithAlphaComponent:0.6]
#define kGrayTransparentColor5      [[UIColor blackColor] colorWithAlphaComponent:0.85]
#define kGrayTransparentColor6      [[UIColor blackColor] colorWithAlphaComponent:0.95]

// 取色值相关的方法
#define RGB(r,g,b)          [UIColor colorWithRed:(r)/255.f \
                                            green:(g)/255.f \
                                             blue:(b)/255.f \
                                            alpha:1.f]

#define RGBA(r,g,b,a)       [UIColor colorWithRed:(r)/255.f \
                                            green:(g)/255.f \
                                             blue:(b)/255.f \
                                            alpha:(a)]

#define RGBOF(rgbValue)     [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
                                            green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
                                             blue:((float)(rgbValue & 0xFF))/255.0 \
                                            alpha:1.0]

#define RGBA_OF(rgbValue)   [UIColor colorWithRed:((float)(((rgbValue) & 0xFF000000) >> 24))/255.0 \
                                             green:((float)(((rgbValue) & 0x00FF0000) >> 16))/255.0 \
                                              blue:((float)(rgbValue & 0x0000FF00) >> 8)/255.0 \
                                             alpha:((float)(rgbValue & 0x000000FF))/255.0]

#define RGBAOF(v, a)        [UIColor colorWithRed:((float)(((v) & 0xFF0000) >> 16))/255.0 \
                                            green:((float)(((v) & 0x00FF00) >> 8))/255.0 \
                                             blue:((float)(v & 0x0000FF))/255.0 \
                                            alpha:a]


// 定义通用颜色
#define kBlackColor         [UIColor blackColor]
#define kDarkGrayColor      [UIColor darkGrayColor]
#define kLightGrayColor     [UIColor lightGrayColor]
#define kWhiteColor         [UIColor whiteColor]
#define kGrayColor          [UIColor grayColor]
#define kRedColor           [UIColor redColor]
#define kGreenColor         [UIColor greenColor]
#define kBlueColor          [UIColor blueColor]
#define kCyanColor          [UIColor cyanColor]
#define kYellowColor        [UIColor yellowColor]
#define kMagentaColor       [UIColor magentaColor]
#define kOrangeColor        [UIColor orangeColor]
#define kPurpleColor        [UIColor purpleColor]
#define kClearColor         [UIColor clearColor]
#define kRandomFlatColor    [UIColor randomFlatColor]


#endif
